{"ast":null,"code":"import { numberInputToObject, rgbaToHex, rgbToHex, rgbToHsl, rgbToHsv } from './conversion';\nimport { names } from './css-color-names';\nimport { inputToRGB } from './format-input';\nimport { bound01, boundAlpha, clamp01 } from './util';\nvar TinyColor = /** @class */function () {\n  function TinyColor(color, opts) {\n    if (color === void 0) {\n      color = '';\n    }\n    if (opts === void 0) {\n      opts = {};\n    }\n    var _a;\n    // If input is already a tinycolor, return itself\n    if (color instanceof TinyColor) {\n      // eslint-disable-next-line no-constructor-return\n      return color;\n    }\n    if (typeof color === 'number') {\n      color = numberInputToObject(color);\n    }\n    this.originalInput = color;\n    var rgb = inputToRGB(color);\n    this.originalInput = color;\n    this.r = rgb.r;\n    this.g = rgb.g;\n    this.b = rgb.b;\n    this.a = rgb.a;\n    this.roundA = Math.round(100 * this.a) / 100;\n    this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format;\n    this.gradientType = opts.gradientType;\n    // Don't let the range of [0,255] come back in [0,1].\n    // Potentially lose a little bit of precision here, but will fix issues where\n    // .5 gets interpreted as half of the total, instead of half of 1\n    // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n    if (this.r < 1) {\n      this.r = Math.round(this.r);\n    }\n    if (this.g < 1) {\n      this.g = Math.round(this.g);\n    }\n    if (this.b < 1) {\n      this.b = Math.round(this.b);\n    }\n    this.isValid = rgb.ok;\n  }\n  TinyColor.prototype.isDark = function () {\n    return this.getBrightness() < 128;\n  };\n  TinyColor.prototype.isLight = function () {\n    return !this.isDark();\n  };\n  /**\n   * Returns the perceived brightness of the color, from 0-255.\n   */\n  TinyColor.prototype.getBrightness = function () {\n    // http://www.w3.org/TR/AERT#color-contrast\n    var rgb = this.toRgb();\n    return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n  };\n  /**\n   * Returns the perceived luminance of a color, from 0-1.\n   */\n  TinyColor.prototype.getLuminance = function () {\n    // http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n    var rgb = this.toRgb();\n    var R;\n    var G;\n    var B;\n    var RsRGB = rgb.r / 255;\n    var GsRGB = rgb.g / 255;\n    var BsRGB = rgb.b / 255;\n    if (RsRGB <= 0.03928) {\n      R = RsRGB / 12.92;\n    } else {\n      // eslint-disable-next-line prefer-exponentiation-operator\n      R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n    }\n    if (GsRGB <= 0.03928) {\n      G = GsRGB / 12.92;\n    } else {\n      // eslint-disable-next-line prefer-exponentiation-operator\n      G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n    }\n    if (BsRGB <= 0.03928) {\n      B = BsRGB / 12.92;\n    } else {\n      // eslint-disable-next-line prefer-exponentiation-operator\n      B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n    }\n    return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n  };\n  /**\n   * Returns the alpha value of a color, from 0-1.\n   */\n  TinyColor.prototype.getAlpha = function () {\n    return this.a;\n  };\n  /**\n   * Sets the alpha value on the current color.\n   *\n   * @param alpha - The new alpha value. The accepted range is 0-1.\n   */\n  TinyColor.prototype.setAlpha = function (alpha) {\n    this.a = boundAlpha(alpha);\n    this.roundA = Math.round(100 * this.a) / 100;\n    return this;\n  };\n  /**\n   * Returns whether the color is monochrome.\n   */\n  TinyColor.prototype.isMonochrome = function () {\n    var s = this.toHsl().s;\n    return s === 0;\n  };\n  /**\n   * Returns the object as a HSVA object.\n   */\n  TinyColor.prototype.toHsv = function () {\n    var hsv = rgbToHsv(this.r, this.g, this.b);\n    return {\n      h: hsv.h * 360,\n      s: hsv.s,\n      v: hsv.v,\n      a: this.a\n    };\n  };\n  /**\n   * Returns the hsva values interpolated into a string with the following format:\n   * \"hsva(xxx, xxx, xxx, xx)\".\n   */\n  TinyColor.prototype.toHsvString = function () {\n    var hsv = rgbToHsv(this.r, this.g, this.b);\n    var h = Math.round(hsv.h * 360);\n    var s = Math.round(hsv.s * 100);\n    var v = Math.round(hsv.v * 100);\n    return this.a === 1 ? \"hsv(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%)\") : \"hsva(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%, \").concat(this.roundA, \")\");\n  };\n  /**\n   * Returns the object as a HSLA object.\n   */\n  TinyColor.prototype.toHsl = function () {\n    var hsl = rgbToHsl(this.r, this.g, this.b);\n    return {\n      h: hsl.h * 360,\n      s: hsl.s,\n      l: hsl.l,\n      a: this.a\n    };\n  };\n  /**\n   * Returns the hsla values interpolated into a string with the following format:\n   * \"hsla(xxx, xxx, xxx, xx)\".\n   */\n  TinyColor.prototype.toHslString = function () {\n    var hsl = rgbToHsl(this.r, this.g, this.b);\n    var h = Math.round(hsl.h * 360);\n    var s = Math.round(hsl.s * 100);\n    var l = Math.round(hsl.l * 100);\n    return this.a === 1 ? \"hsl(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%)\") : \"hsla(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%, \").concat(this.roundA, \")\");\n  };\n  /**\n   * Returns the hex value of the color.\n   * @param allow3Char will shorten hex value to 3 char if possible\n   */\n  TinyColor.prototype.toHex = function (allow3Char) {\n    if (allow3Char === void 0) {\n      allow3Char = false;\n    }\n    return rgbToHex(this.r, this.g, this.b, allow3Char);\n  };\n  /**\n   * Returns the hex value of the color -with a # appened.\n   * @param allow3Char will shorten hex value to 3 char if possible\n   */\n  TinyColor.prototype.toHexString = function (allow3Char) {\n    if (allow3Char === void 0) {\n      allow3Char = false;\n    }\n    return '#' + this.toHex(allow3Char);\n  };\n  /**\n   * Returns the hex 8 value of the color.\n   * @param allow4Char will shorten hex value to 4 char if possible\n   */\n  TinyColor.prototype.toHex8 = function (allow4Char) {\n    if (allow4Char === void 0) {\n      allow4Char = false;\n    }\n    return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);\n  };\n  /**\n   * Returns the hex 8 value of the color -with a # appened.\n   * @param allow4Char will shorten hex value to 4 char if possible\n   */\n  TinyColor.prototype.toHex8String = function (allow4Char) {\n    if (allow4Char === void 0) {\n      allow4Char = false;\n    }\n    return '#' + this.toHex8(allow4Char);\n  };\n  /**\n   * Returns the object as a RGBA object.\n   */\n  TinyColor.prototype.toRgb = function () {\n    return {\n      r: Math.round(this.r),\n      g: Math.round(this.g),\n      b: Math.round(this.b),\n      a: this.a\n    };\n  };\n  /**\n   * Returns the RGBA values interpolated into a string with the following format:\n   * \"RGBA(xxx, xxx, xxx, xx)\".\n   */\n  TinyColor.prototype.toRgbString = function () {\n    var r = Math.round(this.r);\n    var g = Math.round(this.g);\n    var b = Math.round(this.b);\n    return this.a === 1 ? \"rgb(\".concat(r, \", \").concat(g, \", \").concat(b, \")\") : \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(this.roundA, \")\");\n  };\n  /**\n   * Returns the object as a RGBA object.\n   */\n  TinyColor.prototype.toPercentageRgb = function () {\n    var fmt = function (x) {\n      return \"\".concat(Math.round(bound01(x, 255) * 100), \"%\");\n    };\n    return {\n      r: fmt(this.r),\n      g: fmt(this.g),\n      b: fmt(this.b),\n      a: this.a\n    };\n  };\n  /**\n   * Returns the RGBA relative values interpolated into a string\n   */\n  TinyColor.prototype.toPercentageRgbString = function () {\n    var rnd = function (x) {\n      return Math.round(bound01(x, 255) * 100);\n    };\n    return this.a === 1 ? \"rgb(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%)\") : \"rgba(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%, \").concat(this.roundA, \")\");\n  };\n  /**\n   * The 'real' name of the color -if there is one.\n   */\n  TinyColor.prototype.toName = function () {\n    if (this.a === 0) {\n      return 'transparent';\n    }\n    if (this.a < 1) {\n      return false;\n    }\n    var hex = '#' + rgbToHex(this.r, this.g, this.b, false);\n    for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) {\n      var _b = _a[_i],\n        key = _b[0],\n        value = _b[1];\n      if (hex === value) {\n        return key;\n      }\n    }\n    return false;\n  };\n  TinyColor.prototype.toString = function (format) {\n    var formatSet = Boolean(format);\n    format = format !== null && format !== void 0 ? format : this.format;\n    var formattedString = false;\n    var hasAlpha = this.a < 1 && this.a >= 0;\n    var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith('hex') || format === 'name');\n    if (needsAlphaFormat) {\n      // Special case for \"transparent\", all other non-alpha formats\n      // will return rgba when there is transparency.\n      if (format === 'name' && this.a === 0) {\n        return this.toName();\n      }\n      return this.toRgbString();\n    }\n    if (format === 'rgb') {\n      formattedString = this.toRgbString();\n    }\n    if (format === 'prgb') {\n      formattedString = this.toPercentageRgbString();\n    }\n    if (format === 'hex' || format === 'hex6') {\n      formattedString = this.toHexString();\n    }\n    if (format === 'hex3') {\n      formattedString = this.toHexString(true);\n    }\n    if (format === 'hex4') {\n      formattedString = this.toHex8String(true);\n    }\n    if (format === 'hex8') {\n      formattedString = this.toHex8String();\n    }\n    if (format === 'name') {\n      formattedString = this.toName();\n    }\n    if (format === 'hsl') {\n      formattedString = this.toHslString();\n    }\n    if (format === 'hsv') {\n      formattedString = this.toHsvString();\n    }\n    return formattedString || this.toHexString();\n  };\n  TinyColor.prototype.toNumber = function () {\n    return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);\n  };\n  TinyColor.prototype.clone = function () {\n    return new TinyColor(this.toString());\n  };\n  /**\n   * Lighten the color a given amount. Providing 100 will always return white.\n   * @param amount - valid between 1-100\n   */\n  TinyColor.prototype.lighten = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n    var hsl = this.toHsl();\n    hsl.l += amount / 100;\n    hsl.l = clamp01(hsl.l);\n    return new TinyColor(hsl);\n  };\n  /**\n   * Brighten the color a given amount, from 0 to 100.\n   * @param amount - valid between 1-100\n   */\n  TinyColor.prototype.brighten = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n    var rgb = this.toRgb();\n    rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n    rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n    rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n    return new TinyColor(rgb);\n  };\n  /**\n   * Darken the color a given amount, from 0 to 100.\n   * Providing 100 will always return black.\n   * @param amount - valid between 1-100\n   */\n  TinyColor.prototype.darken = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n    var hsl = this.toHsl();\n    hsl.l -= amount / 100;\n    hsl.l = clamp01(hsl.l);\n    return new TinyColor(hsl);\n  };\n  /**\n   * Mix the color with pure white, from 0 to 100.\n   * Providing 0 will do nothing, providing 100 will always return white.\n   * @param amount - valid between 1-100\n   */\n  TinyColor.prototype.tint = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n    return this.mix('white', amount);\n  };\n  /**\n   * Mix the color with pure black, from 0 to 100.\n   * Providing 0 will do nothing, providing 100 will always return black.\n   * @param amount - valid between 1-100\n   */\n  TinyColor.prototype.shade = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n    return this.mix('black', amount);\n  };\n  /**\n   * Desaturate the color a given amount, from 0 to 100.\n   * Providing 100 will is the same as calling greyscale\n   * @param amount - valid between 1-100\n   */\n  TinyColor.prototype.desaturate = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n    var hsl = this.toHsl();\n    hsl.s -= amount / 100;\n    hsl.s = clamp01(hsl.s);\n    return new TinyColor(hsl);\n  };\n  /**\n   * Saturate the color a given amount, from 0 to 100.\n   * @param amount - valid between 1-100\n   */\n  TinyColor.prototype.saturate = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n    var hsl = this.toHsl();\n    hsl.s += amount / 100;\n    hsl.s = clamp01(hsl.s);\n    return new TinyColor(hsl);\n  };\n  /**\n   * Completely desaturates a color into greyscale.\n   * Same as calling `desaturate(100)`\n   */\n  TinyColor.prototype.greyscale = function () {\n    return this.desaturate(100);\n  };\n  /**\n   * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n   * Values outside of this range will be wrapped into this range.\n   */\n  TinyColor.prototype.spin = function (amount) {\n    var hsl = this.toHsl();\n    var hue = (hsl.h + amount) % 360;\n    hsl.h = hue < 0 ? 360 + hue : hue;\n    return new TinyColor(hsl);\n  };\n  /**\n   * Mix the current color a given amount with another color, from 0 to 100.\n   * 0 means no mixing (return current color).\n   */\n  TinyColor.prototype.mix = function (color, amount) {\n    if (amount === void 0) {\n      amount = 50;\n    }\n    var rgb1 = this.toRgb();\n    var rgb2 = new TinyColor(color).toRgb();\n    var p = amount / 100;\n    var rgba = {\n      r: (rgb2.r - rgb1.r) * p + rgb1.r,\n      g: (rgb2.g - rgb1.g) * p + rgb1.g,\n      b: (rgb2.b - rgb1.b) * p + rgb1.b,\n      a: (rgb2.a - rgb1.a) * p + rgb1.a\n    };\n    return new TinyColor(rgba);\n  };\n  TinyColor.prototype.analogous = function (results, slices) {\n    if (results === void 0) {\n      results = 6;\n    }\n    if (slices === void 0) {\n      slices = 30;\n    }\n    var hsl = this.toHsl();\n    var part = 360 / slices;\n    var ret = [this];\n    for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {\n      hsl.h = (hsl.h + part) % 360;\n      ret.push(new TinyColor(hsl));\n    }\n    return ret;\n  };\n  /**\n   * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js\n   */\n  TinyColor.prototype.complement = function () {\n    var hsl = this.toHsl();\n    hsl.h = (hsl.h + 180) % 360;\n    return new TinyColor(hsl);\n  };\n  TinyColor.prototype.monochromatic = function (results) {\n    if (results === void 0) {\n      results = 6;\n    }\n    var hsv = this.toHsv();\n    var h = hsv.h;\n    var s = hsv.s;\n    var v = hsv.v;\n    var res = [];\n    var modification = 1 / results;\n    while (results--) {\n      res.push(new TinyColor({\n        h: h,\n        s: s,\n        v: v\n      }));\n      v = (v + modification) % 1;\n    }\n    return res;\n  };\n  TinyColor.prototype.splitcomplement = function () {\n    var hsl = this.toHsl();\n    var h = hsl.h;\n    return [this, new TinyColor({\n      h: (h + 72) % 360,\n      s: hsl.s,\n      l: hsl.l\n    }), new TinyColor({\n      h: (h + 216) % 360,\n      s: hsl.s,\n      l: hsl.l\n    })];\n  };\n  /**\n   * Compute how the color would appear on a background\n   */\n  TinyColor.prototype.onBackground = function (background) {\n    var fg = this.toRgb();\n    var bg = new TinyColor(background).toRgb();\n    return new TinyColor({\n      r: bg.r + (fg.r - bg.r) * fg.a,\n      g: bg.g + (fg.g - bg.g) * fg.a,\n      b: bg.b + (fg.b - bg.b) * fg.a\n    });\n  };\n  /**\n   * Alias for `polyad(3)`\n   */\n  TinyColor.prototype.triad = function () {\n    return this.polyad(3);\n  };\n  /**\n   * Alias for `polyad(4)`\n   */\n  TinyColor.prototype.tetrad = function () {\n    return this.polyad(4);\n  };\n  /**\n   * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)\n   * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...\n   */\n  TinyColor.prototype.polyad = function (n) {\n    var hsl = this.toHsl();\n    var h = hsl.h;\n    var result = [this];\n    var increment = 360 / n;\n    for (var i = 1; i < n; i++) {\n      result.push(new TinyColor({\n        h: (h + i * increment) % 360,\n        s: hsl.s,\n        l: hsl.l\n      }));\n    }\n    return result;\n  };\n  /**\n   * compare color vs current color\n   */\n  TinyColor.prototype.equals = function (color) {\n    return this.toRgbString() === new TinyColor(color).toRgbString();\n  };\n  return TinyColor;\n}();\nexport { TinyColor };\n// kept for backwards compatability with v1\nexport function tinycolor(color, opts) {\n  if (color === void 0) {\n    color = '';\n  }\n  if (opts === void 0) {\n    opts = {};\n  }\n  return new TinyColor(color, opts);\n}","map":{"version":3,"names":["numberInputToObject","rgbaToHex","rgbToHex","rgbToHsl","rgbToHsv","names","inputToRGB","bound01","boundAlpha","clamp01","TinyColor","color","opts","_a","originalInput","rgb","r","g","b","a","roundA","Math","round","format","gradientType","isValid","ok","prototype","isDark","getBrightness","isLight","toRgb","getLuminance","R","G","B","RsRGB","GsRGB","BsRGB","pow","getAlpha","setAlpha","alpha","isMonochrome","s","toHsl","toHsv","hsv","h","v","toHsvString","concat","hsl","l","toHslString","toHex","allow3Char","toHexString","toHex8","allow4Char","toHex8String","toRgbString","toPercentageRgb","fmt","x","toPercentageRgbString","rnd","toName","hex","_i","Object","entries","length","_b","key","value","toString","formatSet","Boolean","formattedString","hasAlpha","needsAlphaFormat","startsWith","toNumber","clone","lighten","amount","brighten","max","min","darken","tint","mix","shade","desaturate","saturate","greyscale","spin","hue","rgb1","rgb2","p","rgba","analogous","results","slices","part","ret","push","complement","monochromatic","res","modification","splitcomplement","onBackground","background","fg","bg","triad","polyad","tetrad","n","result","increment","i","equals","tinycolor"],"sources":["/data/messenger.client/node_modules/@ctrl/tinycolor/dist/module/index.js"],"sourcesContent":["import { numberInputToObject, rgbaToHex, rgbToHex, rgbToHsl, rgbToHsv } from './conversion';\nimport { names } from './css-color-names';\nimport { inputToRGB } from './format-input';\nimport { bound01, boundAlpha, clamp01 } from './util';\nvar TinyColor = /** @class */ (function () {\n    function TinyColor(color, opts) {\n        if (color === void 0) { color = ''; }\n        if (opts === void 0) { opts = {}; }\n        var _a;\n        // If input is already a tinycolor, return itself\n        if (color instanceof TinyColor) {\n            // eslint-disable-next-line no-constructor-return\n            return color;\n        }\n        if (typeof color === 'number') {\n            color = numberInputToObject(color);\n        }\n        this.originalInput = color;\n        var rgb = inputToRGB(color);\n        this.originalInput = color;\n        this.r = rgb.r;\n        this.g = rgb.g;\n        this.b = rgb.b;\n        this.a = rgb.a;\n        this.roundA = Math.round(100 * this.a) / 100;\n        this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format;\n        this.gradientType = opts.gradientType;\n        // Don't let the range of [0,255] come back in [0,1].\n        // Potentially lose a little bit of precision here, but will fix issues where\n        // .5 gets interpreted as half of the total, instead of half of 1\n        // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n        if (this.r < 1) {\n            this.r = Math.round(this.r);\n        }\n        if (this.g < 1) {\n            this.g = Math.round(this.g);\n        }\n        if (this.b < 1) {\n            this.b = Math.round(this.b);\n        }\n        this.isValid = rgb.ok;\n    }\n    TinyColor.prototype.isDark = function () {\n        return this.getBrightness() < 128;\n    };\n    TinyColor.prototype.isLight = function () {\n        return !this.isDark();\n    };\n    /**\n     * Returns the perceived brightness of the color, from 0-255.\n     */\n    TinyColor.prototype.getBrightness = function () {\n        // http://www.w3.org/TR/AERT#color-contrast\n        var rgb = this.toRgb();\n        return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n    };\n    /**\n     * Returns the perceived luminance of a color, from 0-1.\n     */\n    TinyColor.prototype.getLuminance = function () {\n        // http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n        var rgb = this.toRgb();\n        var R;\n        var G;\n        var B;\n        var RsRGB = rgb.r / 255;\n        var GsRGB = rgb.g / 255;\n        var BsRGB = rgb.b / 255;\n        if (RsRGB <= 0.03928) {\n            R = RsRGB / 12.92;\n        }\n        else {\n            // eslint-disable-next-line prefer-exponentiation-operator\n            R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n        }\n        if (GsRGB <= 0.03928) {\n            G = GsRGB / 12.92;\n        }\n        else {\n            // eslint-disable-next-line prefer-exponentiation-operator\n            G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n        }\n        if (BsRGB <= 0.03928) {\n            B = BsRGB / 12.92;\n        }\n        else {\n            // eslint-disable-next-line prefer-exponentiation-operator\n            B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n        }\n        return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n    };\n    /**\n     * Returns the alpha value of a color, from 0-1.\n     */\n    TinyColor.prototype.getAlpha = function () {\n        return this.a;\n    };\n    /**\n     * Sets the alpha value on the current color.\n     *\n     * @param alpha - The new alpha value. The accepted range is 0-1.\n     */\n    TinyColor.prototype.setAlpha = function (alpha) {\n        this.a = boundAlpha(alpha);\n        this.roundA = Math.round(100 * this.a) / 100;\n        return this;\n    };\n    /**\n     * Returns whether the color is monochrome.\n     */\n    TinyColor.prototype.isMonochrome = function () {\n        var s = this.toHsl().s;\n        return s === 0;\n    };\n    /**\n     * Returns the object as a HSVA object.\n     */\n    TinyColor.prototype.toHsv = function () {\n        var hsv = rgbToHsv(this.r, this.g, this.b);\n        return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };\n    };\n    /**\n     * Returns the hsva values interpolated into a string with the following format:\n     * \"hsva(xxx, xxx, xxx, xx)\".\n     */\n    TinyColor.prototype.toHsvString = function () {\n        var hsv = rgbToHsv(this.r, this.g, this.b);\n        var h = Math.round(hsv.h * 360);\n        var s = Math.round(hsv.s * 100);\n        var v = Math.round(hsv.v * 100);\n        return this.a === 1 ? \"hsv(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%)\") : \"hsva(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%, \").concat(this.roundA, \")\");\n    };\n    /**\n     * Returns the object as a HSLA object.\n     */\n    TinyColor.prototype.toHsl = function () {\n        var hsl = rgbToHsl(this.r, this.g, this.b);\n        return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };\n    };\n    /**\n     * Returns the hsla values interpolated into a string with the following format:\n     * \"hsla(xxx, xxx, xxx, xx)\".\n     */\n    TinyColor.prototype.toHslString = function () {\n        var hsl = rgbToHsl(this.r, this.g, this.b);\n        var h = Math.round(hsl.h * 360);\n        var s = Math.round(hsl.s * 100);\n        var l = Math.round(hsl.l * 100);\n        return this.a === 1 ? \"hsl(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%)\") : \"hsla(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%, \").concat(this.roundA, \")\");\n    };\n    /**\n     * Returns the hex value of the color.\n     * @param allow3Char will shorten hex value to 3 char if possible\n     */\n    TinyColor.prototype.toHex = function (allow3Char) {\n        if (allow3Char === void 0) { allow3Char = false; }\n        return rgbToHex(this.r, this.g, this.b, allow3Char);\n    };\n    /**\n     * Returns the hex value of the color -with a # appened.\n     * @param allow3Char will shorten hex value to 3 char if possible\n     */\n    TinyColor.prototype.toHexString = function (allow3Char) {\n        if (allow3Char === void 0) { allow3Char = false; }\n        return '#' + this.toHex(allow3Char);\n    };\n    /**\n     * Returns the hex 8 value of the color.\n     * @param allow4Char will shorten hex value to 4 char if possible\n     */\n    TinyColor.prototype.toHex8 = function (allow4Char) {\n        if (allow4Char === void 0) { allow4Char = false; }\n        return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);\n    };\n    /**\n     * Returns the hex 8 value of the color -with a # appened.\n     * @param allow4Char will shorten hex value to 4 char if possible\n     */\n    TinyColor.prototype.toHex8String = function (allow4Char) {\n        if (allow4Char === void 0) { allow4Char = false; }\n        return '#' + this.toHex8(allow4Char);\n    };\n    /**\n     * Returns the object as a RGBA object.\n     */\n    TinyColor.prototype.toRgb = function () {\n        return {\n            r: Math.round(this.r),\n            g: Math.round(this.g),\n            b: Math.round(this.b),\n            a: this.a,\n        };\n    };\n    /**\n     * Returns the RGBA values interpolated into a string with the following format:\n     * \"RGBA(xxx, xxx, xxx, xx)\".\n     */\n    TinyColor.prototype.toRgbString = function () {\n        var r = Math.round(this.r);\n        var g = Math.round(this.g);\n        var b = Math.round(this.b);\n        return this.a === 1 ? \"rgb(\".concat(r, \", \").concat(g, \", \").concat(b, \")\") : \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(this.roundA, \")\");\n    };\n    /**\n     * Returns the object as a RGBA object.\n     */\n    TinyColor.prototype.toPercentageRgb = function () {\n        var fmt = function (x) { return \"\".concat(Math.round(bound01(x, 255) * 100), \"%\"); };\n        return {\n            r: fmt(this.r),\n            g: fmt(this.g),\n            b: fmt(this.b),\n            a: this.a,\n        };\n    };\n    /**\n     * Returns the RGBA relative values interpolated into a string\n     */\n    TinyColor.prototype.toPercentageRgbString = function () {\n        var rnd = function (x) { return Math.round(bound01(x, 255) * 100); };\n        return this.a === 1\n            ? \"rgb(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%)\")\n            : \"rgba(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%, \").concat(this.roundA, \")\");\n    };\n    /**\n     * The 'real' name of the color -if there is one.\n     */\n    TinyColor.prototype.toName = function () {\n        if (this.a === 0) {\n            return 'transparent';\n        }\n        if (this.a < 1) {\n            return false;\n        }\n        var hex = '#' + rgbToHex(this.r, this.g, this.b, false);\n        for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) {\n            var _b = _a[_i], key = _b[0], value = _b[1];\n            if (hex === value) {\n                return key;\n            }\n        }\n        return false;\n    };\n    TinyColor.prototype.toString = function (format) {\n        var formatSet = Boolean(format);\n        format = format !== null && format !== void 0 ? format : this.format;\n        var formattedString = false;\n        var hasAlpha = this.a < 1 && this.a >= 0;\n        var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith('hex') || format === 'name');\n        if (needsAlphaFormat) {\n            // Special case for \"transparent\", all other non-alpha formats\n            // will return rgba when there is transparency.\n            if (format === 'name' && this.a === 0) {\n                return this.toName();\n            }\n            return this.toRgbString();\n        }\n        if (format === 'rgb') {\n            formattedString = this.toRgbString();\n        }\n        if (format === 'prgb') {\n            formattedString = this.toPercentageRgbString();\n        }\n        if (format === 'hex' || format === 'hex6') {\n            formattedString = this.toHexString();\n        }\n        if (format === 'hex3') {\n            formattedString = this.toHexString(true);\n        }\n        if (format === 'hex4') {\n            formattedString = this.toHex8String(true);\n        }\n        if (format === 'hex8') {\n            formattedString = this.toHex8String();\n        }\n        if (format === 'name') {\n            formattedString = this.toName();\n        }\n        if (format === 'hsl') {\n            formattedString = this.toHslString();\n        }\n        if (format === 'hsv') {\n            formattedString = this.toHsvString();\n        }\n        return formattedString || this.toHexString();\n    };\n    TinyColor.prototype.toNumber = function () {\n        return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);\n    };\n    TinyColor.prototype.clone = function () {\n        return new TinyColor(this.toString());\n    };\n    /**\n     * Lighten the color a given amount. Providing 100 will always return white.\n     * @param amount - valid between 1-100\n     */\n    TinyColor.prototype.lighten = function (amount) {\n        if (amount === void 0) { amount = 10; }\n        var hsl = this.toHsl();\n        hsl.l += amount / 100;\n        hsl.l = clamp01(hsl.l);\n        return new TinyColor(hsl);\n    };\n    /**\n     * Brighten the color a given amount, from 0 to 100.\n     * @param amount - valid between 1-100\n     */\n    TinyColor.prototype.brighten = function (amount) {\n        if (amount === void 0) { amount = 10; }\n        var rgb = this.toRgb();\n        rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n        rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n        rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n        return new TinyColor(rgb);\n    };\n    /**\n     * Darken the color a given amount, from 0 to 100.\n     * Providing 100 will always return black.\n     * @param amount - valid between 1-100\n     */\n    TinyColor.prototype.darken = function (amount) {\n        if (amount === void 0) { amount = 10; }\n        var hsl = this.toHsl();\n        hsl.l -= amount / 100;\n        hsl.l = clamp01(hsl.l);\n        return new TinyColor(hsl);\n    };\n    /**\n     * Mix the color with pure white, from 0 to 100.\n     * Providing 0 will do nothing, providing 100 will always return white.\n     * @param amount - valid between 1-100\n     */\n    TinyColor.prototype.tint = function (amount) {\n        if (amount === void 0) { amount = 10; }\n        return this.mix('white', amount);\n    };\n    /**\n     * Mix the color with pure black, from 0 to 100.\n     * Providing 0 will do nothing, providing 100 will always return black.\n     * @param amount - valid between 1-100\n     */\n    TinyColor.prototype.shade = function (amount) {\n        if (amount === void 0) { amount = 10; }\n        return this.mix('black', amount);\n    };\n    /**\n     * Desaturate the color a given amount, from 0 to 100.\n     * Providing 100 will is the same as calling greyscale\n     * @param amount - valid between 1-100\n     */\n    TinyColor.prototype.desaturate = function (amount) {\n        if (amount === void 0) { amount = 10; }\n        var hsl = this.toHsl();\n        hsl.s -= amount / 100;\n        hsl.s = clamp01(hsl.s);\n        return new TinyColor(hsl);\n    };\n    /**\n     * Saturate the color a given amount, from 0 to 100.\n     * @param amount - valid between 1-100\n     */\n    TinyColor.prototype.saturate = function (amount) {\n        if (amount === void 0) { amount = 10; }\n        var hsl = this.toHsl();\n        hsl.s += amount / 100;\n        hsl.s = clamp01(hsl.s);\n        return new TinyColor(hsl);\n    };\n    /**\n     * Completely desaturates a color into greyscale.\n     * Same as calling `desaturate(100)`\n     */\n    TinyColor.prototype.greyscale = function () {\n        return this.desaturate(100);\n    };\n    /**\n     * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n     * Values outside of this range will be wrapped into this range.\n     */\n    TinyColor.prototype.spin = function (amount) {\n        var hsl = this.toHsl();\n        var hue = (hsl.h + amount) % 360;\n        hsl.h = hue < 0 ? 360 + hue : hue;\n        return new TinyColor(hsl);\n    };\n    /**\n     * Mix the current color a given amount with another color, from 0 to 100.\n     * 0 means no mixing (return current color).\n     */\n    TinyColor.prototype.mix = function (color, amount) {\n        if (amount === void 0) { amount = 50; }\n        var rgb1 = this.toRgb();\n        var rgb2 = new TinyColor(color).toRgb();\n        var p = amount / 100;\n        var rgba = {\n            r: (rgb2.r - rgb1.r) * p + rgb1.r,\n            g: (rgb2.g - rgb1.g) * p + rgb1.g,\n            b: (rgb2.b - rgb1.b) * p + rgb1.b,\n            a: (rgb2.a - rgb1.a) * p + rgb1.a,\n        };\n        return new TinyColor(rgba);\n    };\n    TinyColor.prototype.analogous = function (results, slices) {\n        if (results === void 0) { results = 6; }\n        if (slices === void 0) { slices = 30; }\n        var hsl = this.toHsl();\n        var part = 360 / slices;\n        var ret = [this];\n        for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results;) {\n            hsl.h = (hsl.h + part) % 360;\n            ret.push(new TinyColor(hsl));\n        }\n        return ret;\n    };\n    /**\n     * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js\n     */\n    TinyColor.prototype.complement = function () {\n        var hsl = this.toHsl();\n        hsl.h = (hsl.h + 180) % 360;\n        return new TinyColor(hsl);\n    };\n    TinyColor.prototype.monochromatic = function (results) {\n        if (results === void 0) { results = 6; }\n        var hsv = this.toHsv();\n        var h = hsv.h;\n        var s = hsv.s;\n        var v = hsv.v;\n        var res = [];\n        var modification = 1 / results;\n        while (results--) {\n            res.push(new TinyColor({ h: h, s: s, v: v }));\n            v = (v + modification) % 1;\n        }\n        return res;\n    };\n    TinyColor.prototype.splitcomplement = function () {\n        var hsl = this.toHsl();\n        var h = hsl.h;\n        return [\n            this,\n            new TinyColor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),\n            new TinyColor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),\n        ];\n    };\n    /**\n     * Compute how the color would appear on a background\n     */\n    TinyColor.prototype.onBackground = function (background) {\n        var fg = this.toRgb();\n        var bg = new TinyColor(background).toRgb();\n        return new TinyColor({\n            r: bg.r + (fg.r - bg.r) * fg.a,\n            g: bg.g + (fg.g - bg.g) * fg.a,\n            b: bg.b + (fg.b - bg.b) * fg.a,\n        });\n    };\n    /**\n     * Alias for `polyad(3)`\n     */\n    TinyColor.prototype.triad = function () {\n        return this.polyad(3);\n    };\n    /**\n     * Alias for `polyad(4)`\n     */\n    TinyColor.prototype.tetrad = function () {\n        return this.polyad(4);\n    };\n    /**\n     * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)\n     * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...\n     */\n    TinyColor.prototype.polyad = function (n) {\n        var hsl = this.toHsl();\n        var h = hsl.h;\n        var result = [this];\n        var increment = 360 / n;\n        for (var i = 1; i < n; i++) {\n            result.push(new TinyColor({ h: (h + i * increment) % 360, s: hsl.s, l: hsl.l }));\n        }\n        return result;\n    };\n    /**\n     * compare color vs current color\n     */\n    TinyColor.prototype.equals = function (color) {\n        return this.toRgbString() === new TinyColor(color).toRgbString();\n    };\n    return TinyColor;\n}());\nexport { TinyColor };\n// kept for backwards compatability with v1\nexport function tinycolor(color, opts) {\n    if (color === void 0) { color = ''; }\n    if (opts === void 0) { opts = {}; }\n    return new TinyColor(color, opts);\n}\n"],"mappings":"AAAA,SAASA,mBAAmB,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAC3F,SAASC,KAAK,QAAQ,mBAAmB;AACzC,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,OAAO,EAAEC,UAAU,EAAEC,OAAO,QAAQ,QAAQ;AACrD,IAAIC,SAAS,GAAG,aAAe,YAAY;EACvC,SAASA,SAAS,CAACC,KAAK,EAAEC,IAAI,EAAE;IAC5B,IAAID,KAAK,KAAK,KAAK,CAAC,EAAE;MAAEA,KAAK,GAAG,EAAE;IAAE;IACpC,IAAIC,IAAI,KAAK,KAAK,CAAC,EAAE;MAAEA,IAAI,GAAG,CAAC,CAAC;IAAE;IAClC,IAAIC,EAAE;IACN;IACA,IAAIF,KAAK,YAAYD,SAAS,EAAE;MAC5B;MACA,OAAOC,KAAK;IAChB;IACA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;MAC3BA,KAAK,GAAGX,mBAAmB,CAACW,KAAK,CAAC;IACtC;IACA,IAAI,CAACG,aAAa,GAAGH,KAAK;IAC1B,IAAII,GAAG,GAAGT,UAAU,CAACK,KAAK,CAAC;IAC3B,IAAI,CAACG,aAAa,GAAGH,KAAK;IAC1B,IAAI,CAACK,CAAC,GAAGD,GAAG,CAACC,CAAC;IACd,IAAI,CAACC,CAAC,GAAGF,GAAG,CAACE,CAAC;IACd,IAAI,CAACC,CAAC,GAAGH,GAAG,CAACG,CAAC;IACd,IAAI,CAACC,CAAC,GAAGJ,GAAG,CAACI,CAAC;IACd,IAAI,CAACC,MAAM,GAAGC,IAAI,CAACC,KAAK,CAAC,GAAG,GAAG,IAAI,CAACH,CAAC,CAAC,GAAG,GAAG;IAC5C,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